<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Javascript Study</title>
</head>
<body>
    <script lang="text/Javascript">
    
    let a1 = { a:'kyle'};
    console.log(a1);
    

    let A = function(){
        this.a = 123;
        this.fun = function(){
            console.log("fun " +this);
        };
    }
    A.prototype.fun2 = function(){
        console.log("fun2 " +this);
    }

    let a2 = new A();
    console.log(a2);

    a2.fun();
    a2.fun2();
    console.log(a2.fun);
    console.log(a2.fun2);


    function B(){
        console.log('B()');
    }

    let b1= new B();

    B.prototype = {b:2, a:'a'}

    let b2 = new B();

    console.log(b1, b2);
    
    
    </script>

</body>
</html>